package com.eduction.modules.system.dao;

import java.sql.SQLException;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.eduction.common.dbutil.DbHelper;
import com.eduction.modules.system.entity.FileDownload;

@Repository
public class FileDownloadRepository {

	@Autowired
	private DbHelper dbHelper;
	@Autowired
	private FileDownloadDao fileDownloadDao;
	
	public FileDownload queryFileDownload() throws SQLException{
		String sql = "SELECT * FROM t_file";
		return dbHelper.getBean(sql, FileDownload.class);
		
	}
	
	public void saveFileDownload(FileDownload f){
		fileDownloadDao.save(f);
	}
}
